package com.example.common.route.algorithm.consistenthash;


import com.example.common.route.RouteHandle;

import java.util.List;

public class ConsistentHashHandle implements RouteHandle {  //使用一直性hash


    //TreeMap
    private AbstractConsistentHash hash;

    public void setHash(AbstractConsistentHash hash) {
        this.hash = hash;
    }
    @Override
    public String routeServer(List<String> values, String key) {
        return hash.process(values,key);
    }
}
